\chapter{Using The RISC-V GNU Toolchain}

This chapter discusses using the GNU toolchain elements to
experiment with the material in this book.

See \autoref{chapter:install} if you do not already have the 
GNU crosscompiler toolchain available on your system.


Discuss the choice of ilp32 as well as what the other variations would do.

Discuss rv32im and note that the details are found in \autoref{chapter:RV32}.

Discuss installing and using one of the RISC-V simulators 
here.

Describe the pre-processor, compiler, assembler and linker.

Source, object, and binary files

Assembly syntax (label: mnemonic op1, op2, op3  \# comment).

text, data, bss, stack

Labels and scope.

Forward \& backward references to throw-away labels.

The entry address of an application.

.s file contain assembler code.
.S (or .sx) files contain assembler code that must be preprocessed.~\cite[p.~29]{gcc:2017}

Pre-processing conditional assembly using \#if.

Building with \verb@-mabi=ilp32 -march=rv32i -mno-fdiv -mno-div@ to match
the config options on the toolchain.  

Linker scripts.

Makefiles

objdump

nm

hexdump -C
